#include <iostream>
struct Student
{
    int id ;
    char name[20];
    char sex;
    double score;
    int age;
};

int main(){
    struct Student s[3];

    for (int i = 0; i < 3; i++)
    {
        std::cout<<"请输入第"<<i + 1 << "个学生的id:";
        std::cin >> s[i].id;
        std::cout<<"请输入第"<<i + 1 << "个学生的姓名:";
        std::cin >> s[i].name;
        std::cout<<"请输入第"<<i + 1 << "个学生的性别:";
        std::cin >> s[i].sex;
        std::cout<<"请输入第"<<i + 1 << "个学生的成绩:";
        std::cin >> s[i].score;
        std::cout<<"请输入第"<<i + 1 << "个学生的年龄:";
        std::cin >> s[i].age;
    }
    
    for (int i = 0; i < 3; i++)
    {
        std::cout << "第"<< i+1 << "个学生id："<< s[i].id << ",name:"
                <<s[i].name << ",性别："<<s[i].sex << ",年龄:"<<
                s[i].age<<",成绩:"<< s[i].score << std::endl;
    }
    while(1);

    return 0 ;
}
